snapshot: Rename append APIs
authorBenjamin Otte <otte@redhat.com>
Fri, 13 Jan 2017 03:46:09 +0000 (04:46 +0100)
committerBenjamin Otte <otte@redhat.com>
Fri, 13 Jan 2017 03:46:09 +0000 (04:46 +0100)
Instead of having gtk_snapshot_append_foo_node(), just have
gtk_snapshot_append_foo(). Nobody needs to know that this internally
uses nodes.

32 files changed:
docs/reference/gtk/gtk4-sections.txt
docs/reference/gtk/migrating-3to4.xml
gtk/gtkcalendar.c
gtk/gtkcellrenderer.c
gtk/gtkcellrendererspinner.c
gtk/gtkcellrenderertext.c
gtk/gtkcolorplane.c
gtk/gtkcolorscale.c
gtk/gtkcolorswatch.c
gtk/gtkcssimage.c
gtk/gtkcssimagebuiltin.c
gtk/gtkcssimagefallback.c
gtk/gtkcssimageicontheme.c
gtk/gtkcssimagelinear.c
gtk/gtkcssimagesurface.c
gtk/gtkdebugupdates.c
gtk/gtkdrawingarea.c
gtk/gtkentry.c
gtk/gtkflowbox.c
gtk/gtklabel.c
gtk/gtkpopover.c
gtk/gtkrenderbackground.c
gtk/gtkrenderborder.c
gtk/gtkrendericon.c
gtk/gtkscale.c
gtk/gtksnapshot.c
gtk/gtksnapshot.h
gtk/gtkstylecontext.c
gtk/gtktreeview.c
gtk/gtkwidget.c
gtk/inspector/cellrenderergraph.c
gtk/inspector/rendernodeview.c

index d74a2a9ed5245907817ab0aaf0cfe4e6f90454f1..cb93cf9b8a144bede745e491ecb408695ad68318 100644 (file)
@@ -4465,9 +4465,9 @@ gtk_snapshot_set_transform
 gtk_snapshot_transform
 gtk_snapshot_translate_2d
 gtk_snapshot_append_node
-gtk_snapshot_append_cairo_node
-gtk_snapshot_append_texture_node
-gtk_snapshot_append_color_node
+gtk_snapshot_append_cairo
+gtk_snapshot_append_texture
+gtk_snapshot_append_color
 gtk_snapshot_clips_rect
 gtk_snapshot_render_background
 gtk_snapshot_render_frame
index 49b81a99811ccea25a2201a948ed45065bfb0581..537aad0aa741025cc2ef711f4a46243253118e8c 100644 (file)
         to a cairo surface. Instead, they have a snapshot() function that creates
         one or more GskRenderNodes to represent their content. Third-party widgets
         that use a draw() function or a #GtkWidget::draw signal handler for custom
-        drawing will need to be converted to use gtk_snapshot_append_cairo_node().
+        drawing will need to be converted to use gtk_snapshot_append_cairo().
       </para>
       <para>
         The auxiliary #GtkSnapshot object has APIs to help with creating render
index 93813942634061cdb8636d74df770a9216427c27..532bc36ca519c7d0d9c7d7ae344a62f4064ea5ad 100644 (file)
@@ -2588,13 +2588,13 @@ calendar_snapshot_day (GtkCalendar *calendar,
 
       gtk_style_context_get_color (context, &color);
 
-      gtk_snapshot_append_color_node (snapshot,
-                                      &color,
-                                      &GRAPHENE_RECT_INIT (
-                                          day_rect.x + 2, y_loc,
-                                          day_rect.width - 2, 1
-                                      ),
-                                      "CalendarDetailSeparator");
+      gtk_snapshot_append_color (snapshot,
+                                 &color,
+                                 &GRAPHENE_RECT_INIT (
+                                     day_rect.x + 2, y_loc,
+                                     day_rect.width - 2, 1
+                                 ),
+                                 "CalendarDetailSeparator");
 
       y_loc += 2;
     }
index 334ddcaaae3a6ea3936ec33c218047634e2bcfee..a76474ce42d3747d2c4eeb9cf9d523cb0193d46b 100644 (file)
@@ -756,13 +756,13 @@ gtk_cell_renderer_snapshot (GtkCellRenderer      *cell,
 
   if (priv->cell_background_set && !selected)
     {
-      gtk_snapshot_append_color_node (snapshot,
-                                      &priv->cell_background,
-                                      &GRAPHENE_RECT_INIT (
-                                          background_area->x, background_area->y,
-                                          background_area->width, background_area->height
-                                      ),
-                                      "CellBackground");
+      gtk_snapshot_append_color (snapshot,
+                                 &priv->cell_background,
+                                 &GRAPHENE_RECT_INIT (
+                                     background_area->x, background_area->y,
+                                     background_area->width, background_area->height
+                                 ),
+                                 "CellBackground");
     }
 
   gtk_snapshot_push_clip (snapshot,
index 8803d36e432fea402e59ce55493f17c78f9b0b3b..527a7455b81a2d9f746ddc2c9aece753f9a1cc3c 100644 (file)
@@ -417,12 +417,12 @@ gtk_cell_renderer_spinner_snapshot (GtkCellRenderer      *cellr,
   if (!gdk_rectangle_intersect (cell_area, &pix_rect, &draw_rect))
     return;
 
-  cr = gtk_snapshot_append_cairo_node (snapshot,
-                                       &GRAPHENE_RECT_INIT (
-                                           cell_area->x, cell_area->y,
-                                           cell_area->width, cell_area->height
-                                       ),
-                                       "CellSpinner");
+  cr = gtk_snapshot_append_cairo (snapshot,
+                                  &GRAPHENE_RECT_INIT (
+                                      cell_area->x, cell_area->y,
+                                      cell_area->width, cell_area->height
+                                  ),
+                                  "CellSpinner");
 
   gtk_paint_spinner (gtk_widget_get_style_context (widget),
                      cr,
index a969a3649de3556e68824984e61107618a9b75d2..691f19562ae3ff9d6619149df4fcbb4cb54ad428 100644 (file)
@@ -1735,13 +1735,13 @@ gtk_cell_renderer_text_snapshot (GtkCellRenderer      *cell,
 
   if (priv->background_set && (flags & GTK_CELL_RENDERER_SELECTED) == 0)
     {
-      gtk_snapshot_append_color_node (snapshot,
-                                      &priv->background,
-                                      &GRAPHENE_RECT_INIT(
-                                          background_area->x, background_area->y,
-                                          background_area->width, background_area->height
-                                      ),
-                                      "CellTextBackground");
+      gtk_snapshot_append_color (snapshot,
+                                 &priv->background,
+                                 &GRAPHENE_RECT_INIT(
+                                     background_area->x, background_area->y,
+                                     background_area->width, background_area->height
+                                 ),
+                                 "CellTextBackground");
     }
 
   gtk_cell_renderer_get_padding (cell, &xpad, &ypad);
index a9295652d74d0c6c5374b33d349afb8ec1374834..8b9c1f92a5778df2c4dcb43356228da1c4b1911e 100644 (file)
@@ -80,9 +80,9 @@ plane_snapshot (GtkWidget   *widget,
   width = gtk_widget_get_allocated_width (widget);
   height = gtk_widget_get_allocated_height (widget);
 
-  cr = gtk_snapshot_append_cairo_node (snapshot,
-                                       &GRAPHENE_RECT_INIT (0, 0, width, height),
-                                       "ColorPlane");
+  cr = gtk_snapshot_append_cairo (snapshot,
+                                  &GRAPHENE_RECT_INIT (0, 0, width, height),
+                                  "ColorPlane");
 
   cairo_set_source_surface (cr, plane->priv->surface, 0, 0);
   cairo_paint (cr);
index b8564ae13a85d183485670f89dec8ba0c117516b..417caeffdf472277572db9efafb7be516f711834 100644 (file)
@@ -67,9 +67,9 @@ gtk_color_scale_snapshot_trough (GtkColorScale  *scale,
   if (width <= 1 || height <= 1)
     return;
 
-  cr = gtk_snapshot_append_cairo_node (snapshot,
-                                       &GRAPHENE_RECT_INIT(x, y, width, height),
-                                       "ColorScaleTrough");
+  cr = gtk_snapshot_append_cairo (snapshot,
+                                  &GRAPHENE_RECT_INIT(x, y, width, height),
+                                  "ColorScaleTrough");
   cairo_translate (cr, x, y);
 
   if (gtk_orientable_get_orientation (GTK_ORIENTABLE (widget)) == GTK_ORIENTATION_HORIZONTAL &&
index a7af9a7ffe16b08170ae3eb50b4d49e7103891fa..7a4c5e36ca2ce59b8fdc7a49c78983d75024e7ae 100644 (file)
@@ -143,9 +143,9 @@ gtk_color_swatch_render (GtkCssGadget *gadget,
         {
           cairo_t *cr;
 
-          cr = gtk_snapshot_append_cairo_node (snapshot,
-                                               &content_box.bounds,
-                                               "CheckeredBackground");
+          cr = gtk_snapshot_append_cairo (snapshot,
+                                          &content_box.bounds,
+                                          "CheckeredBackground");
           cairo_set_source_rgb (cr, 0.33, 0.33, 0.33);
           cairo_paint (cr);
 
@@ -159,10 +159,10 @@ gtk_color_swatch_render (GtkCssGadget *gadget,
 
           cairo_destroy (cr);
 
-          gtk_snapshot_append_color_node (snapshot,
-                                          &swatch->priv->color,
-                                          &content_box.bounds,
-                                          "ColorSwatch Color");
+          gtk_snapshot_append_color (snapshot,
+                                     &swatch->priv->color,
+                                     &content_box.bounds,
+                                     "ColorSwatch Color");
         }
       else
         {
@@ -170,10 +170,10 @@ gtk_color_swatch_render (GtkCssGadget *gadget,
 
           color.alpha = 1.0;
 
-          gtk_snapshot_append_color_node (snapshot,
-                                          &color,
-                                          &content_box.bounds,
-                                          "ColorSwatch Opaque Color");
+          gtk_snapshot_append_color (snapshot,
+                                     &color,
+                                     &content_box.bounds,
+                                     "ColorSwatch Opaque Color");
         }
 
       gtk_snapshot_pop (snapshot);
index 822ba4726fc97672415ed077679e39448f69b601..bcf22f8ce45300d40193e0c7c2851088a025cb88 100644 (file)
@@ -126,9 +126,9 @@ gtk_css_image_real_snapshot (GtkCssImage *image,
 {
   cairo_t *cr;
 
-  cr = gtk_snapshot_append_cairo_node (snapshot,
-                                       &GRAPHENE_RECT_INIT (0, 0, width, height),
-                                       "Fallback<%s>", G_OBJECT_TYPE_NAME (image));
+  cr = gtk_snapshot_append_cairo (snapshot,
+                                  &GRAPHENE_RECT_INIT (0, 0, width, height),
+                                  "Fallback<%s>", G_OBJECT_TYPE_NAME (image));
   _gtk_css_image_draw (image, cr, width, height);
   cairo_destroy (cr);
 }
index 67cc0614722393381d5412af22ba9631d5eb5ac1..5732a79ae63afe7a54a1770d23505efa9421696c 100644 (file)
@@ -662,9 +662,9 @@ gtk_css_image_builtin_snapshot (GtkCssImage            *image,
       return;
     }
 
-  cr = gtk_snapshot_append_cairo_node (snapshot,
-                                       &GRAPHENE_RECT_INIT (0, 0, width, height),
-                                       "BuiltinImage<%d>", (int) image_type);
+  cr = gtk_snapshot_append_cairo (snapshot,
+                                  &GRAPHENE_RECT_INIT (0, 0, width, height),
+                                  "BuiltinImage<%d>", (int) image_type);
   gtk_css_image_builtin_draw (image, cr, width, height, image_type);
   cairo_destroy (cr);
 }
index a1f74e6859846f3e803a2b5d8538038cf697eb3b..b34cde9d25a399fdf443b28b4edcc77bf26b6e7e 100644 (file)
@@ -79,7 +79,7 @@ gtk_css_image_fallback_snapshot (GtkCssImage *image,
       else
         color = &red;
 
-      gtk_snapshot_append_color_node (snapshot, color, &GRAPHENE_RECT_INIT (0, 0, width, height), "image() Fallback Color");
+      gtk_snapshot_append_color (snapshot, color, &GRAPHENE_RECT_INIT (0, 0, width, height), "image() Fallback Color");
     }
   else
     gtk_css_image_snapshot (fallback->images[fallback->used], snapshot, width, height);
index 22457909f24ed97244d071037f61491e5e65c89a..da6d9fa536f66f929722387e4592b524143b7e32 100644 (file)
@@ -86,15 +86,15 @@ gtk_css_image_icon_theme_snapshot (GtkCssImage *image,
   texture_width = (double) gdk_pixbuf_get_width (pixbuf) / icon_theme->scale;
   texture_height = (double) gdk_pixbuf_get_height (pixbuf) / icon_theme->scale;
 
-  gtk_snapshot_append_texture_node (snapshot,
-                                    texture,
-                                    &GRAPHENE_RECT_INIT(
-                                        (width - texture_width) / 2.0,
-                                        (height - texture_height) / 2.0,
-                                        texture_width,
-                                        texture_height
-                                    ),
-                                    "CssImageIconTheme<%s@%d>", icon_theme->name, icon_theme->scale);
+  gtk_snapshot_append_texture (snapshot,
+                               texture,
+                               &GRAPHENE_RECT_INIT(
+                                   (width - texture_width) / 2.0,
+                                   (height - texture_height) / 2.0,
+                                   texture_width,
+                                   texture_height
+                               ),
+                               "CssImageIconTheme<%s@%d>", icon_theme->name, icon_theme->scale);
 
   g_object_unref (texture);
   g_object_unref (pixbuf);
index 7200c4895167ce81264beab4ada33711318516f6..e25c1b6f79a3485c9cf1501c65fd9b4a3fcc69f7 100644 (file)
@@ -187,10 +187,10 @@ gtk_css_image_linear_snapshot (GtkCssImage        *image,
        * get the color of the last color stop */
       GtkCssImageLinearColorStop *stop = &g_array_index (linear->stops, GtkCssImageLinearColorStop, linear->stops->len - 1);
 
-      gtk_snapshot_append_color_node (snapshot,
-                                      _gtk_css_rgba_value_get_rgba (stop->color),
-                                      &GRAPHENE_RECT_INIT (0, 0, width, height),
-                                      "RepeatingLinearGradient<degenerate>");
+      gtk_snapshot_append_color (snapshot,
+                                 _gtk_css_rgba_value_get_rgba (stop->color),
+                                 &GRAPHENE_RECT_INIT (0, 0, width, height),
+                                 "RepeatingLinearGradient<degenerate>");
       return;
     }
 
index 426a6d1ac3155a7e2459e5bc670cd58fe556c6de..a41781f6823577eadf4272e15a469b4eac1e4dac 100644 (file)
@@ -56,12 +56,12 @@ gtk_css_image_surface_snapshot (GtkCssImage *image,
   if (surface->texture == NULL)
     return;
 
-  gtk_snapshot_append_texture_node (snapshot,
-                                    surface->texture,
-                                    &GRAPHENE_RECT_INIT (0, 0, width, height),
-                                    "Surface Image %dx%d",
-                                    gsk_texture_get_width (surface->texture),
-                                    gsk_texture_get_height (surface->texture));
+  gtk_snapshot_append_texture (snapshot,
+                               surface->texture,
+                               &GRAPHENE_RECT_INIT (0, 0, width, height),
+                               "Surface Image %dx%d",
+                               gsk_texture_get_width (surface->texture),
+                               gsk_texture_get_height (surface->texture));
 }
 
 static void
index 4ae62895127f3ca07ac21243d5bd5778cb6a0286..81ef6ad0ccaf1828f48232025c0b206cd2c4d286 100644 (file)
@@ -284,10 +284,10 @@ gtk_debug_updates_snapshot (GtkWidget   *widget,
       for (i = 0; i < cairo_region_num_rectangles (draw->region); i++)
         {
           cairo_region_get_rectangle (draw->region, i, &rect);
-          gtk_snapshot_append_color_node (snapshot,
-                                          &(GdkRGBA) { 1, 0, 0, 0.4 * (1 - progress) },
-                                          &GRAPHENE_RECT_INIT(rect.x, rect.y, rect.width, rect.height),
-                                          "Debug Updates<%g>", progress);
+          gtk_snapshot_append_color (snapshot,
+                                     &(GdkRGBA) { 1, 0, 0, 0.4 * (1 - progress) },
+                                     &GRAPHENE_RECT_INIT(rect.x, rect.y, rect.width, rect.height),
+                                     "Debug Updates<%g>", progress);
         }
     }
 }
index ecea4c6e9aa8fb24ab9580e983c6c442557e637c..7478256ff42df8aa2692088ef0d3e5af157da916 100644 (file)
@@ -239,11 +239,13 @@ gtk_drawing_area_snapshot (GtkWidget   *widget,
   if (!priv->draw_func)
     return;
 
-  cr = gtk_snapshot_append_cairo_node (snapshot,
-                                       &GRAPHENE_RECT_INIT (0, 0,
-                                         gtk_widget_get_allocated_width (widget),
-                                         gtk_widget_get_allocated_height (widget)),
-                                       "DrawingAreaContents");
+  cr = gtk_snapshot_append_cairo (snapshot,
+                                  &GRAPHENE_RECT_INIT (
+                                      0, 0,
+                                      gtk_widget_get_allocated_width (widget),
+                                      gtk_widget_get_allocated_height (widget)
+                                  ),
+                                  "DrawingAreaContents");
   priv->draw_func (self,
                    cr,
                    gtk_widget_get_allocated_width (widget),
index 2a04129483c6819f24872f59454b2842946d9df1..9d2b1a9429a6d630fb768a9646dccdc24493b83c 100644 (file)
@@ -3601,12 +3601,12 @@ gtk_entry_render (GtkCssGadget *gadget,
     gtk_css_gadget_snapshot (priv->progress_gadget, snapshot);
 
   /* Draw text and cursor */
-  cr = gtk_snapshot_append_cairo_node (snapshot,
-                                       &GRAPHENE_RECT_INIT (x + priv->text_x,
-                                                            y,
-                                                            priv->text_width,
-                                                            height),
-                                       "Entry Text");
+  cr = gtk_snapshot_append_cairo (snapshot,
+                                  &GRAPHENE_RECT_INIT (x + priv->text_x,
+                                                       y,
+                                                       priv->text_width,
+                                                       height),
+                                  "Entry Text");
 
   if (priv->dnd_position != -1)
     gtk_entry_draw_cursor (GTK_ENTRY (widget), cr, CURSOR_DND);
index 6a6a4a6611d267befb39fed647abe97553d3c0f6..a014e491e6b6b126b079641dfb0cb701bbf82cd7 100644 (file)
@@ -2560,9 +2560,9 @@ gtk_flow_box_render (GtkCssGadget *gadget,
 
       vertical = priv->orientation == GTK_ORIENTATION_VERTICAL;
 
-      cr = gtk_snapshot_append_cairo_node (snapshot,
-                                           &GRAPHENE_RECT_INIT (x, y, width, height),
-                                           "FlowBox Rubberband");
+      cr = gtk_snapshot_append_cairo (snapshot,
+                                      &GRAPHENE_RECT_INIT (x, y, width, height),
+                                      "FlowBox Rubberband");
 
       context = gtk_widget_get_style_context (widget);
       gtk_style_context_save_to_node (context, priv->rubberband_node);
index 575621d27de68d4354df7aec8b570e01df023239..bc5ae4c3ef0aa5cd2c0765c1b1ab0481e30a4b38 100644 (file)
@@ -4236,9 +4236,9 @@ gtk_label_render (GtkCssGadget *gadget,
 
           range_clip = gdk_pango_layout_get_clip_region (priv->layout, lx, ly, range, 1);
           cairo_region_get_extents (range_clip, &clip_extents);
-          cr = gtk_snapshot_append_cairo_node (snapshot,
-                                               &GRAPHENE_RECT_FROM_RECT (&clip_extents),
-                                               "Selected Text");
+          cr = gtk_snapshot_append_cairo (snapshot,
+                                          &GRAPHENE_RECT_FROM_RECT (&clip_extents),
+                                          "Selected Text");
           gtk_style_context_save_to_node (context, info->selection_node);
 
           gdk_cairo_region (cr, range_clip);
@@ -4286,9 +4286,9 @@ gtk_label_render (GtkCssGadget *gadget,
 
               range_clip = gdk_pango_layout_get_clip_region (priv->layout, lx, ly, range, 1);
               cairo_region_get_extents (range_clip, &clip_extents);
-              cr = gtk_snapshot_append_cairo_node (snapshot,
-                                                   &GRAPHENE_RECT_FROM_RECT(&clip_extents),
-                                                   "Active Link");
+              cr = gtk_snapshot_append_cairo (snapshot,
+                                              &GRAPHENE_RECT_FROM_RECT(&clip_extents),
+                                              "Active Link");
               gdk_cairo_region (cr, range_clip);
               cairo_clip (cr);
               cairo_region_destroy (range_clip);
index 3376ec027e6ffab4f55c1a595f23acbbc32d9850..4a6c753c96fb5a072471c6645dc99d9e25a94b9a 100644 (file)
@@ -1127,9 +1127,9 @@ gtk_popover_snapshot (GtkWidget   *widget,
   graphene_rect_init (&bounds,
                       clip.x - allocation.x, clip.y - allocation.y,
                       clip.width, clip.height);
-  cr = gtk_snapshot_append_cairo_node (snapshot,
-                                       &bounds,
-                                       "Popover");
+  cr = gtk_snapshot_append_cairo (snapshot,
+                                  &bounds,
+                                  "Popover");
   /* Render the rect background */
   gtk_render_background (context, cr,
                          rect_x, rect_y,
index bca7dc13f76e8a3923ea58835b731de01255a10f..b7a46bd7af17ce570d4a06e8e7972814e70159fb 100644 (file)
@@ -91,20 +91,20 @@ gtk_theming_background_snapshot_color (GtkThemingBackground *bg,
 
   if (gsk_rounded_rect_is_rectilinear (&bg->boxes[clip]))
     {
-      gtk_snapshot_append_color_node (snapshot,
-                                      bg_color,
-                                      &bg->boxes[clip].bounds,
-                                      "BackgroundColor");
+      gtk_snapshot_append_color (snapshot,
+                                 bg_color,
+                                 &bg->boxes[clip].bounds,
+                                 "BackgroundColor");
     }
   else
     {
       gtk_snapshot_push_rounded_clip (snapshot,
                                       &bg->boxes[clip],
                                       "BackgroundColorClip");
-      gtk_snapshot_append_color_node (snapshot,
-                                      bg_color,
-                                      &bg->boxes[clip].bounds,
-                                      "BackgroundColor");
+      gtk_snapshot_append_color (snapshot,
+                                 bg_color,
+                                 &bg->boxes[clip].bounds,
+                                 "BackgroundColor");
       gtk_snapshot_pop (snapshot);
     }
 }
index a42f74e42bec25e167b11ba294e6ace4b387a34a..7d671a2fb3c79d257b57e42f2f16c9edd2585ebd 100644 (file)
@@ -589,9 +589,9 @@ snapshot_frame_stroke (GtkSnapshot    *snapshot,
   double double_width[4] = { border_width[0], border_width[1], border_width[2], border_width[3] };
   cairo_t *cr;
 
-  cr = gtk_snapshot_append_cairo_node (snapshot,
-                                       &outline->bounds,
-                                       "BorderStroke");
+  cr = gtk_snapshot_append_cairo (snapshot,
+                                  &outline->bounds,
+                                  "BorderStroke");
   render_frame_stroke (cr, outline, double_width, colors, hidden_side, stroke_style);
   cairo_destroy (cr);
 }
@@ -941,9 +941,9 @@ gtk_css_style_snapshot_border (GtkCssStyle *style,
     {
       double double_width[4] = { border_width[0], border_width[1], border_width[2], border_width[3] };
 
-      cr = gtk_snapshot_append_cairo_node (snapshot,
-                                           &bounds,
-                                           "Border Image");
+      cr = gtk_snapshot_append_cairo (snapshot,
+                                      &bounds,
+                                      "Border Image");
       gtk_border_image_render (&border_image, double_width, cr, 0, 0, width, height);
       cairo_destroy (cr);
     }
index f8c50fa6a4b4c7e088974c0cc3e1009b9b859591..ff7eac978e4d4e630becfa3ca6875350f6d3198b 100644 (file)
@@ -305,7 +305,7 @@ gtk_css_style_snapshot_icon_texture (GtkCssStyle *style,
                           0, 0,
                           gsk_texture_get_width (texture) / texture_scale,
                           gsk_texture_get_height (texture) / texture_scale);
-      gtk_snapshot_append_texture_node (snapshot, texture, &bounds, "Icon");
+      gtk_snapshot_append_texture (snapshot, texture, &bounds, "Icon");
     }
   else
     {
@@ -320,7 +320,7 @@ gtk_css_style_snapshot_icon_texture (GtkCssStyle *style,
       gtk_snapshot_push_transform (snapshot, &matrix, "Icon Transform");
 
       graphene_rect_init (&bounds, 0, 0, gsk_texture_get_width (texture), gsk_texture_get_height (texture));
-      gtk_snapshot_append_texture_node (snapshot, texture, &bounds, "Icon");
+      gtk_snapshot_append_texture (snapshot, texture, &bounds, "Icon");
 
       gtk_snapshot_pop (snapshot);
     }
index baa5c7722ec9d14e17620f103f8179f95abc4a07..46afb9e47d84ebd22c2017bdab16813991a23f38 100644 (file)
@@ -1758,15 +1758,15 @@ gtk_scale_render_mark_indicator (GtkCssGadget *gadget,
 
   gtk_style_context_get_color (context, &color);
   if (orientation == GTK_ORIENTATION_HORIZONTAL)
-    gtk_snapshot_append_color_node (snapshot,
-                                    &color, 
-                                    &GRAPHENE_RECT_INIT(x + width / 2, y, 1, height),
-                                    "ScaleMark");
+    gtk_snapshot_append_color (snapshot,
+                               &color, 
+                               &GRAPHENE_RECT_INIT(x + width / 2, y, 1, height),
+                               "ScaleMark");
   else
-    gtk_snapshot_append_color_node (snapshot,
-                                    &color, 
-                                    &GRAPHENE_RECT_INIT(x, y + height / 2, width, 1),
-                                    "ScaleMark");
+    gtk_snapshot_append_color (snapshot,
+                               &color, 
+                               &GRAPHENE_RECT_INIT(x, y + height / 2, width, 1),
+                               "ScaleMark");
 
   gtk_style_context_restore (context);
 
index 7c9a75a1431f86e7e25fe654a969e80a3a1ace6e..00d6242b9378c0fa6e756becec7e7d50c1ec6256 100644 (file)
@@ -40,7 +40,7 @@
  * a cairo context, and maintains a stack of render nodes and their associated
  * transformations.
  *
- * The node at the top of the stack is the the one that gtk_snapshot_append_node()
+ * The node at the top of the stack is the the one that gtk_snapshot_append()
  * operates on. Use the gtk_snapshot_push() and gtk_snapshot_pop() functions to
  * change the current node.
  *
@@ -987,10 +987,10 @@ gtk_snapshot_translate_2d (GtkSnapshot *snapshot,
  *
  * Use this offset to determine how to offset nodes that you
  * manually add to the snapshot using
- * gtk_snapshot_append_node().
+ * gtk_snapshot_append().
  *
  * Note that other functions that add nodes for you, such as
- * gtk_snapshot_append_cairo_node() will add this offset for
+ * gtk_snapshot_append_cairo() will add this offset for
  * you.
  **/
 void
@@ -1033,7 +1033,7 @@ gtk_snapshot_append_node (GtkSnapshot   *snapshot,
 }
 
 /**
- * gtk_snapshot_append_cairo_node:
+ * gtk_snapshot_append_cairo:
  * @snapshot: a #GtkSnapshot
  * @bounds: the bounds for the new node
  * @name: (transfer none): a printf() style format string for the name for the new node
@@ -1048,10 +1048,10 @@ gtk_snapshot_append_node (GtkSnapshot   *snapshot,
  * Since: 3.90
  */
 cairo_t *
-gtk_snapshot_append_cairo_node (GtkSnapshot           *snapshot,
-                                const graphene_rect_t *bounds,
-                                const char            *name,
-                                ...)
+gtk_snapshot_append_cairo (GtkSnapshot           *snapshot,
+                           const graphene_rect_t *bounds,
+                           const char            *name,
+                           ...)
 {
   GskRenderNode *node;
   graphene_rect_t real_bounds;
@@ -1088,7 +1088,7 @@ gtk_snapshot_append_cairo_node (GtkSnapshot           *snapshot,
 }
 
 /**
- * gtk_snapshot_append_texture_node:
+ * gtk_snapshot_append_texture:
  * @snapshot: a #GtkSnapshot
  * @texture: the #GskTexture to render
  * @bounds: the bounds for the new node
@@ -1099,11 +1099,11 @@ gtk_snapshot_append_cairo_node (GtkSnapshot           *snapshot,
  * to the current render node of @snapshot.
  **/
 void
-gtk_snapshot_append_texture_node (GtkSnapshot            *snapshot,
-                                  GskTexture             *texture,
-                                  const graphene_rect_t  *bounds,
-                                  const char             *name,
-                                  ...)
+gtk_snapshot_append_texture (GtkSnapshot            *snapshot,
+                             GskTexture             *texture,
+                             const graphene_rect_t  *bounds,
+                             const char             *name,
+                             ...)
 {
   GskRenderNode *node;
   graphene_rect_t real_bounds;
@@ -1134,7 +1134,7 @@ gtk_snapshot_append_texture_node (GtkSnapshot            *snapshot,
 }
 
 /**
- * gtk_snapshot_append_color_node:
+ * gtk_snapshot_append_color:
  * @snapshot: a #GtkSnapshot
  * @color: the #GdkRGBA to draw
  * @bounds: the bounds for the new node
@@ -1147,11 +1147,11 @@ gtk_snapshot_append_texture_node (GtkSnapshot            *snapshot,
  * You should try to avoid calling this function if @color is transparent.
  **/
 void
-gtk_snapshot_append_color_node (GtkSnapshot           *snapshot,
-                                const GdkRGBA         *color,
-                                const graphene_rect_t *bounds,
-                                const char            *name,
-                                ...)
+gtk_snapshot_append_color (GtkSnapshot           *snapshot,
+                           const GdkRGBA         *color,
+                           const graphene_rect_t *bounds,
+                           const char            *name,
+                           ...)
 {
   GskRenderNode *node;
   graphene_rect_t real_bounds;
@@ -1193,7 +1193,7 @@ gtk_snapshot_append_color_node (GtkSnapshot           *snapshot,
  * Since: 3.90
  */
 gboolean
-gtk_snapshot_clips_rect (GtkSnapshot           *snapshot,
+gtk_snapshot_clips_rect (GtkSnapshot                 *snapshot,
                          const cairo_rectangle_int_t *rect)
 {
   cairo_rectangle_int_t offset_rect;
@@ -1352,7 +1352,7 @@ gtk_snapshot_render_layout (GtkSnapshot     *snapshot,
 
   gtk_snapshot_translate_2d (snapshot, x, y);
 
-  cr = gtk_snapshot_append_cairo_node (snapshot, &bounds, "Text<%dchars>", pango_layout_get_character_count (layout));
+  cr = gtk_snapshot_append_cairo (snapshot, &bounds, "Text<%dchars>", pango_layout_get_character_count (layout));
 
   _gtk_css_shadows_value_paint_layout (shadow, cr, layout);
 
index d44ad4d84daa6ba5abee16afa3154f0539c73b7b..1e28dd12fed2bfc2276bbe9a29a414857a6436e3 100644 (file)
@@ -105,18 +105,18 @@ GDK_AVAILABLE_IN_3_90
 void            gtk_snapshot_append_node                (GtkSnapshot            *snapshot,
                                                          GskRenderNode          *node);
 GDK_AVAILABLE_IN_3_90
-cairo_t *       gtk_snapshot_append_cairo_node          (GtkSnapshot            *snapshot,
+cairo_t *       gtk_snapshot_append_cairo               (GtkSnapshot            *snapshot,
                                                          const graphene_rect_t  *bounds,
                                                          const char             *name,
                                                          ...) G_GNUC_PRINTF(3, 4);
 GDK_AVAILABLE_IN_3_90
-void            gtk_snapshot_append_texture_node        (GtkSnapshot            *snapshot,
+void            gtk_snapshot_append_texture             (GtkSnapshot            *snapshot,
                                                          GskTexture             *texture,
                                                          const graphene_rect_t  *bounds,
                                                          const char             *name,
                                                          ...) G_GNUC_PRINTF (4, 5);
 GDK_AVAILABLE_IN_3_90
-void            gtk_snapshot_append_color_node          (GtkSnapshot            *snapshot,
+void            gtk_snapshot_append_color               (GtkSnapshot            *snapshot,
                                                          const GdkRGBA          *color,
                                                          const graphene_rect_t  *bounds,
                                                          const char             *name,
index 683bee87524f785ffcb82a51956c68c3c48d6e5a..83746631ff2a9c99410a51ada15ef5d2ed2253b2 100644 (file)
@@ -2123,9 +2123,9 @@ snapshot_insertion_cursor (GtkSnapshot     *snapshot,
   cairo_t *cr;
   
   get_insertion_cursor_bounds (height, direction, draw_arrow, &bounds);
-  cr = gtk_snapshot_append_cairo_node (snapshot,
-                                       &bounds,
-                                       "%s Cursor", is_primary ? "Primary" : "Secondary");
+  cr = gtk_snapshot_append_cairo (snapshot,
+                                  &bounds,
+                                  "%s Cursor", is_primary ? "Primary" : "Secondary");
 
   draw_insertion_cursor (context, cr, 0, 0, height, is_primary, direction, draw_arrow);
 
index 7e7f3d5edd5c309b5a786e241cc3e591f5aaa827..10d80f4f2307e1eaff6bef6c4a49677380e3b12c 100644 (file)
@@ -4678,14 +4678,14 @@ gtk_tree_view_snapshot_line (GtkTreeView         *tree_view,
   GtkStyleContext *context;
   cairo_t *cr;
 
-  cr = gtk_snapshot_append_cairo_node (snapshot,
-                                       &GRAPHENE_RECT_INIT (
-                                          MIN (x1, x2),
-                                          MIN (y1, y2),
-                                          ABS (x2 - x1) + 1,
-                                          ABS (y2 - y1) + 1
-                                       ),
-                                       "TreeViewGridLine");
+  cr = gtk_snapshot_append_cairo (snapshot,
+                                  &GRAPHENE_RECT_INIT (
+                                     MIN (x1, x2),
+                                     MIN (y1, y2),
+                                     ABS (x2 - x1) + 1,
+                                     ABS (y2 - y1) + 1
+                                  ),
+                                  "TreeViewGridLine");
 
   context = gtk_widget_get_style_context (GTK_WIDGET (tree_view));
 
@@ -5078,15 +5078,15 @@ gtk_tree_view_bin_snapshot (GtkWidget   *widget,
                   gtk_style_context_add_class (context, GTK_STYLE_CLASS_SEPARATOR);
 
                   gtk_style_context_get_color (context, &color);
-                  gtk_snapshot_append_color_node (snapshot,
-                                                  &color, 
-                                                  &GRAPHENE_RECT_INIT(
-                                                      cell_area.x,
-                                                      cell_area.y + cell_area.height / 2,
-                                                      cell_area.x + cell_area.width,
-                                                      1
-                                                  ),
-                                                  "Separator");
+                  gtk_snapshot_append_color (snapshot,
+                                             &color, 
+                                             &GRAPHENE_RECT_INIT(
+                                                 cell_area.x,
+                                                 cell_area.y + cell_area.height / 2,
+                                                 cell_area.x + cell_area.width,
+                                                 1
+                                             ),
+                                             "Separator");
 
                   gtk_style_context_restore (context);
                 }
@@ -5119,15 +5119,15 @@ gtk_tree_view_bin_snapshot (GtkWidget   *widget,
                   gtk_style_context_add_class (context, GTK_STYLE_CLASS_SEPARATOR);
 
                   gtk_style_context_get_color (context, &color);
-                  gtk_snapshot_append_color_node (snapshot,
-                                                  &color, 
-                                                  &GRAPHENE_RECT_INIT(
-                                                      cell_area.x,
-                                                      cell_area.y + cell_area.height / 2,
-                                                      cell_area.x + cell_area.width,
-                                                      1
-                                                  ),
-                                                  "Separator");
+                  gtk_snapshot_append_color (snapshot,
+                                             &color, 
+                                             &GRAPHENE_RECT_INIT(
+                                                 cell_area.x,
+                                                 cell_area.y + cell_area.height / 2,
+                                                 cell_area.x + cell_area.width,
+                                                 1
+                                             ),
+                                             "Separator");
 
                   gtk_style_context_restore (context);
                 }
@@ -14228,15 +14228,15 @@ gtk_tree_view_create_row_drag_icon (GtkTreeView  *tree_view,
               gtk_style_context_add_class (context, GTK_STYLE_CLASS_SEPARATOR);
 
               gtk_style_context_get_color (context, &color);
-              gtk_snapshot_append_color_node (&snapshot,
-                                              &color, 
-                                              &GRAPHENE_RECT_INIT(
-                                                  cell_area.x,
-                                                  cell_area.y + cell_area.height / 2,
-                                                  cell_area.x + cell_area.width,
-                                                  1
-                                              ),
-                                              "Separator");
+              gtk_snapshot_append_color (&snapshot,
+                                         &color, 
+                                         &GRAPHENE_RECT_INIT(
+                                             cell_area.x,
+                                             cell_area.y + cell_area.height / 2,
+                                             cell_area.x + cell_area.width,
+                                             1
+                                         ),
+                                         "Separator");
 
               gtk_style_context_restore (context);
             }
index e84179ded48968081210be4fa2aef624269a20b7..0c1b7407a94e29fd97886c0d7d955f0674103297 100644 (file)
@@ -15632,9 +15632,9 @@ gtk_widget_snapshot (GtkWidget   *widget,
     {
       cairo_t *cr;
 
-      cr = gtk_snapshot_append_cairo_node (snapshot, 
-                                           &bounds, "Fallback<%s>",
-                                           G_OBJECT_TYPE_NAME (widget));
+      cr = gtk_snapshot_append_cairo (snapshot, 
+                                      &bounds, "Fallback<%s>",
+                                      G_OBJECT_TYPE_NAME (widget));
       gtk_widget_draw_internal (widget, cr, TRUE);
       cairo_destroy (cr);
     }
@@ -15653,9 +15653,9 @@ gtk_widget_snapshot (GtkWidget   *widget,
           gboolean result;
           cairo_t *cr;
 
-          cr = gtk_snapshot_append_cairo_node (snapshot, 
-                                               &bounds,
-                                               "DrawSignalContents<%s>", G_OBJECT_TYPE_NAME (widget));
+          cr = gtk_snapshot_append_cairo (snapshot, 
+                                          &bounds,
+                                          "DrawSignalContents<%s>", G_OBJECT_TYPE_NAME (widget));
           g_signal_emit (widget, widget_signals[DRAW], 0, cr, &result);
           cairo_destroy (cr);
         }
index 08e4e8d95f30b6181357fad29fabe2ab3b998ace..0d63bf6135e553705f33589f71f8683d91d17896 100644 (file)
@@ -195,12 +195,12 @@ gtk_cell_renderer_graph_snapshot (GtkCellRenderer      *cell,
   context = gtk_widget_get_style_context (widget);
   gtk_style_context_get_color (context, &color);
 
-  cr = gtk_snapshot_append_cairo_node (snapshot,
-                                       &GRAPHENE_RECT_INIT (
-                                           background_area->x, background_area->y,
-                                           background_area->width, background_area->height
-                                       ),
-                                       "CellGraph");
+  cr = gtk_snapshot_append_cairo (snapshot,
+                                  &GRAPHENE_RECT_INIT (
+                                      background_area->x, background_area->y,
+                                      background_area->width, background_area->height
+                                  ),
+                                  "CellGraph");
 
   cairo_set_line_width (cr, 1.0);
 
index 3d0b81b5f14faad0ab391a6a7ad62e536bbb9309..0272211fe276f9841947d82ed84c819d1eb572fc 100644 (file)
@@ -236,9 +236,9 @@ gtk_render_node_view_snapshot (GtkWidget   *widget,
   height = gtk_widget_get_allocated_height (widget);
 
   graphene_rect_init (&rect, 0, 0, width, height);
-  cr = gtk_snapshot_append_cairo_node (snapshot,
-                                       &rect,
-                                       "RenderNodeView");
+  cr = gtk_snapshot_append_cairo (snapshot,
+                                  &rect,
+                                  "RenderNodeView");
 
   cairo_translate (cr, width / 2.0, height / 2.0);
   if (width < viewport.width || height < viewport.height)